package day08;

import java.util.Scanner;

public class Visitor01 {
    String name;
    int age;
    String ticket;
    String zimu;

    public void show(){
        Scanner input = new Scanner(System.in);
        System.out.println("请输入姓名：");
        name = input.next();
        System.out.println("请输入年龄");
        age  = input.nextInt();
        if (age>18){
            System.out.println(name+"的年龄为"+age+"门票价为：20元");
        }else {
            System.out.println(name+"的年龄为"+age+"门票价为免费");
        }while (name=="n"){
            System.out.println("退出程序");
        }
    }
}
